package com.ops.memcache.bean;


import com.ops.uitl.data.IData;
import com.ops.uitl.data.IDataset;
import com.ops.uitl.tapestry.AppEntity;
import com.ops.uitl.tapestry.PageData;

public class MemCacheDao extends AppEntity
{
  public MemCacheDao(PageData pd)
    throws Exception
  {
    super(pd, "sdcen1");
  }

  public MemCacheDao(PageData pd, String connName)
    throws Exception
  {
    super(pd, connName);
  }

  public IDataset query_MemcacheInfo_dao(IData param, PageData pd, String chan_id)
    throws Exception
  {
    StringBuffer sql = new StringBuffer();
    sql.append(" SELECT KEY , VALUE  FROM  TF_B_ECH_MEMCACHE ");
    sql.append(" WHERE CHAN_ID='" + chan_id + "' or CHAN_ID='E000' ");
    sql.append(" AND ENABLE_TAG='1' ");
    sql.append(" AND START_DATE < SYSDATE ");
    IDataset ds = queryList(sql.toString());
    return (((ds == null) || (ds.size() <= 0)) ? null : ds);
  }

  public static void main(String[] args)
  {
  }
}